﻿
using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Gift.DAL;
using Gift.Model;

namespace WebSite.admin.company
{
    public partial class companyPartnerRemark : BaseAdmin
    {
        readonly DALCompanyPartner theCompanyPartner = new DALCompanyPartner();
        tbCompanyPartner oCompanyPartner;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.BuildForm();
            }
        }

        void BuildForm()
        {
            oCompanyPartner = theCompanyPartner.GetModel(int.Parse(Request.QueryString["id"]));
            this.lblTitle.Text = oCompanyPartner.description;

        }

        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            oCompanyPartner = theCompanyPartner.GetModel(int.Parse(Request.QueryString["id"]));
            oCompanyPartner.processRemark = this.txtReplay.Text.Trim();
            oCompanyPartner.isProcess = true;
            oCompanyPartner.processTime = DateTime.Now;
            oCompanyPartner.processAdmin = int.Parse(base.AdminUserId);
            theCompanyPartner.Update(oCompanyPartner);
            ExtAspNet.PageContext.RegisterStartupScript(ExtAspNet.ActiveWindow.GetHidePostBackReference());
        }
    }
}